package com.mcmaster.android;

import java.util.ArrayList;

import android.R;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Point;
import android.graphics.drawable.Drawable;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapView;
import com.google.android.maps.OverlayItem;


public class MapOverlay extends com.google.android.maps.Overlay
{
	GeoPoint p_;
	
	public MapOverlay (GeoPoint p) {
		p_ = p;
	}
	
    @Override
    public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) 
    {
        super.draw(canvas, mapView, shadow);                   
        
        Point screenPts = new Point();
        mapView.getProjection().toPixels(p_, screenPts);

        Bitmap bmp = BitmapFactory.decodeResource(mapView.getResources(), R.drawable.androidmarker);            
        canvas.drawBitmap(bmp, screenPts.x, screenPts.y-50, null);         
        return true;
    }
}
